/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.rhythm.commons.io.filters;

import java.io.File;
import java.io.FileFilter;

/**
 *
 * @author mlee
 */
public class HiddenFileFilter implements FileFilter {

    private static final HiddenFileFilter INSTANCE = new HiddenFileFilter();

    /**
     * Returns a singleton instance of the {@code HiddenFileFilter}\
     */
    public static HiddenFileFilter getInstance(){
        return INSTANCE;
    }

    private HiddenFileFilter() {
        //Don't expose.
    }

    public boolean accept(File pathname) {
        return ((pathname.isHidden())? false: pathname.isFile());
    }
}
